﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Tema_inginerie
{
    class CarFactory: AbstractFactory
    {
       
      
        public override AbstractMasina CreareMasina(string tip,string nume)
        {
            if (tip.Equals("Sedan")) return new Sedan(nume);
           else if (tip.Equals("Coupe"))
               return new Coupe(nume);
            else if (tip.Equals("Mini")) return new Mini(nume);
            return null;
        }
      
    }
}
